package com.liberty.servlet.async;

import java.util.Map;

import org.springframework.stereotype.Service;
import org.springframework.web.context.request.async.DeferredResult.DeferredResultHandler;

@Service
public class AsyncHandler implements DeferredResultHandler {

	@Override
	public void handleResult(Object result) {
		((Map<String, String>) result).put("code", "0");
		System.out.println(
				"this is AsyncHandler:" + Thread.currentThread().getId() + " " + Thread.currentThread().getName());
	}

}
